home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / ISP / SCRPTLST / IONRAMP.CMD < prev    next >
Encoding:
Text File  |  1996-02-12  |  2.9 KB  |  136 lines

  1. ###########################################
  2. # LOGIN.CMD - Call Internet On-Ramp, Inc. #
  3. ###########################################
  4.  
  5. #trace on
  6. #
  7. # set up some strings for dialling up
  8. #
  9. load $number
  10. load $username
  11.  
  12. if ![load $password]
  13.   if [password "Enter your login password, or 'prompt'."]
  14.     save $password
  15.   end
  16. end
  17. if [$password = "prompt"]
  18.   $password = ""
  19.   password "Enter your login password."
  20. end
  21.  
  22. $modeminit = "&f"
  23. $modemsetup = "&c1"
  24. $userprompt = "ogin:"
  25. $passprompt = "word:"
  26. $addrtarg = "to"
  27.  
  28. # If you wish tho change the number of redial attempts,
  29. # alter the 'attempts' variable below.
  30. #
  31. %attempts = 10
  32. #
  33. #----------------------------------------------------------
  34. #
  35. # initialize modem
  36. #
  37. output "at"$modeminit\13
  38. if ! [input 10 OK\n]
  39.   display "Modem is not responding"\n
  40.   abort
  41. end
  42. #
  43. # setup our modem commands
  44. #
  45. output "at"$modemsetup\13
  46. input 10 OK\n
  47. #
  48. #
  49. display \n
  50. display Attempting to Call Internet On-Ramp.\n
  51. display Should a busy signals be encountered, %attempts\n
  52. display attempts will be made at 60 second intervals.\n
  53. display To abort the redial process, press the ESC key.\n 
  54. display \n
  55. #
  56. # send phone number
  57. #
  58. %n = 1
  59. repeat
  60.   display Connect attempt Number %n\n
  61.   if %n > %attempts
  62.     display Too many dial attempts\n
  63.     abort
  64.   end
  65.   output "atdt"$number\13
  66.   %ok = [input 60 CONNECT]
  67.   %n = %n + 1
  68. until %ok
  69. input 10 \n
  70. #
  71. #  wait till it's safe to send because some modem's hang up
  72. #  if you transmit during the connection phase
  73. #
  74. wait 30 dcd
  75. sleep 1
  76. #
  77. #
  78. #  wait for the username prompt
  79. #
  80. input 30 $userprompt
  81. output $username\13
  82. #
  83. # and the password
  84. #
  85. input 30 $passprompt
  86. output $password\13
  87. #
  88. if ! [input 20 $addrtarg]
  89.   # 
  90.   # prevent prying eyes from seeing the $password variable
  91.   #
  92.   $password = ""
  93.   #
  94.   display \n\n\n
  95.   display \7Something is Wrong.  We couldn\'t get logged in.  You may \n
  96.   display \7have entered an incorrect password or the server might be\n
  97.   display \7down or very busy right now.  First, try running \'SETUP.CMD\'\n
  98.   display \7from the Winsock \'Dialer\' menu to change the password.  If \n
  99.   display \7this is ineffective, call IOR support for assistance.\n
  100.   display \n
  101.   #
  102.   sleep 3
  103.   output +++
  104.   input 5 OK\n
  105.   output ath0\r
  106.   input 5 OK\n
  107.   # 
  108.   abort
  109.   #
  110. else
  111.   # 
  112.   # prevent prying eyes from seeing the $password variable
  113.   #
  114.   $password = ""
  115.   #
  116.   # parse address
  117.   #
  118.   address 30
  119.   #
  120.   # we are now connected, logged in and in PPP mode.
  121.   #
  122.   display \n
  123.   display Your IP address is \i.\n
  124.   display \n
  125.   #
  126.   sleep 5
  127.   display You may now minimize this window and start another Network Application.\n
  128.   display \n
  129.   display To start this window minimized in the future, do the following:\n
  130.   display \tMinimize this Window.\n
  131.   display \tClick on the Winsock Icon.\n
  132.   display \tClick on \'Close\'.\n
  133.   display \n\7
  134.   #
  135. end
  136.